home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / QuickDraw 3D / Samples / SampleCode / Plug-in - Postscript Renderer / IR_Shell / IRS_Register.c < prev    next >
Encoding:
C/C++ Source or Header  |  1997-08-14  |  1.9 KB  |  74 lines  |  [TEXT/CWIE]

  1. /******************************************************************************\
  2.                                                                         
  3.         Module:        IRS_Register.c                                            
  4.                                                                             
  5.         Purpose:     plug-in renderer's registration methods                                
  6.                                                                         
  7.         Author:        Sun-Inn Shih                                        
  8.                                                                         
  9.         Copyright (C) 1993-96 Apple Computer, Inc.  All rights reserved.    
  10.                                                                             
  11. \*****************************************************************************/
  12.  
  13. #include <QD3D.h>
  14. #include <QD3DRenderer.h>
  15. #include <QD3DExtension.h>
  16. #include "IRS_MetaHandler.h"
  17. #include "IRShell.h"
  18.  
  19. TQ3XObjectClass    RendererClass;
  20.  
  21. #include <CodeFragments.h>
  22.  
  23. OSErr IRSRegister(
  24.     void);
  25.  
  26. long IRSExit(
  27.     void);
  28.  
  29. /*===========================================================================*\
  30.  *
  31.  *    Routine:    IRSRegister()
  32.  *
  33.  *    Purpose: Register an object class in the QuickDraw 3D hierarchy.
  34.  *
  35.  *    QD3D calls: Q3XObjectHierarchy_RegisterClass() in QD3DExtentionl.h
  36.  *
  37. \*===========================================================================*/
  38. OSErr IRSRegister(
  39.     void)
  40. {
  41.     TQ3ObjectType    classType;                         /* This is returned from QD3D */
  42.             
  43.     RendererClass =
  44.             Q3XObjectHierarchy_RegisterClass(        /* register into QD3D hierarchy */
  45.                 kQ3SharedTypeRenderer,                /* parent type - a existing type */
  46.                 &classType,                            /* the new object class type */
  47.                 "IR Shell",                            /* name, used in the text metafile */
  48.                 IRSMetaHandler,                      /* metahandler */                
  49.                 NULL,                                /* virtual meta handler*/    
  50.                 0,                                    /* methods Size */
  51.                 sizeof(struct irsData));            /* size of the object instandce data */
  52.  
  53.     if(RendererClass == NULL)
  54.     {
  55.         return kQ3Failure;
  56.     }
  57.     
  58.     return noErr;
  59. }
  60.  
  61. /*===========================================================================*\
  62.  *
  63.  *    Routine:    IRSExit()
  64.  *
  65.  *    Comments:    exit share library
  66.  *
  67. \*===========================================================================*/
  68.  
  69. long IRSExit(
  70.     void)
  71. {
  72.     return 0;
  73. }
  74.